﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                   assembly="Core"
                   namespace="Core.Model">
  <class name="Perfil" table="PERFIL_USUARIO">
    <id name="Id" column="PERFIL_ID">
      <generator class="native">
        <param name="sequence">GEN_ID_PERFIL</param>
      </generator>
    </id>
    <property name="Nome" column="NOME" length="60" not-null="true" />
    <property name="Descricao" column="DESCRICAO" length="200" />
    <property name="Permissoes" column="PERMISSAO" length="512" not-null="true" />
    <bag name="Usuario" inverse="true" lazy="true" cascade="delete">
      <key column="PERFIL_ID" />
      <one-to-many class="Core.Model.Usuario,Core" />
    </bag>
  </class>
</hibernate-mapping>